added edit fucntionality