added margin for snapping