refactory routes