changed pushing of attributes to send a json object in a POST request