added a reusable router class