sign flip when crossing center
implemented sign flip