changed js for map