fixed up the route filtering, added shitty error handling