changing the js around so the map works