adding route logic