implemented basic router functionality