why not move this into a separate js file?