added better route handling