Implemented three types of edit