start of front-end
tiny refactor of routing functions