remade routes and hooks