added a function that converts the 24 hour cycle to am/pm