refactored router stuffs
refactored router stuffs