added snap.js