add support for static routes - based on the patch from #1365