added snapping