extracted threetimestable type and functions to separate header file