move edit to a separate template file