Navigation to room, Rewrite code