bug fix with amPM or statements