added a couple functions to check if routes exist