Renamed the "edit" method to "update" and capsuled the "update" method into "edit" to guarantee functionality