add snap behavior