jamie model and copy over function from extended router core (only comment changes in that function)