added edit funciton