added jpa functionality