i hate math, and i hate it in javascript