updated code for router use