added onsnap.js