fixed Edit.java and implemented update method