need help in resolving the timeout program ran too long error"