Add in automatically route function