actual_result function bug fix, time bug fix