added a tick function that gets called each frame