add class function and time picker