updates edit route so that it works