updated for router and layoutmanager