simplified by removing get_minute() function