start to implement time-interval (not compiling yet)