changing the calls to json calls and added jpa helper