better support for diff methods, refactored routing loop