first implementation of time diagram