added arrow snapping