[buggy] Implemented tick function.