added some route support. to get rid of that oldschool if/else stuff with open variable