working on handleEditResource