applied strategy pattern on Router methods for easier testing