refacting routes