swapped out setTimeout in favor of requestAnimationFrame
using the timestamp that came with requestAnimationFrame instead of Date().getTime()