converting project to javascript