Implemented proper routing for all three paths