implemented tick()