javascript heavy lifting