Code not getting executed. Seeing the "Program ran too long" error