changed properties to map, easier in javascript