rewritting createClockTrigger