creating edit funtionality
some changes in templates and added edit template