cleaned up the js