edit function working including updating of database. CRU but not D