abstracted router logic to it's own file and class