Modified clamp.js b/c I couldn't figure out how to use the function.