adjusted edit and add functions so they work