added snapping for movement