working in onGround and onAir functions