Updated to resolve set_time_limit error.