implemented safety timer