another refactor, now minifies js