added more features in saving

added edit button and disabling buttons if necessary...