#15 added snap on resize