completed basic functionality for core and router rewrites