better route handling, refers #9