starting to move common code to a router