added edit route and function