starting to figure out the js