fix editing and adding