need to fix update function in JPA