rearranged router stuff