added edit function for every model