need to clean up the js