redesigned, OOP functions, routing