make .route() accept route function