fix function check input time