changed initialization of properties js object from array to object (with endpoints as keys)