Modified to persist data using spring data jpa