changing to using new stdClass()