dirty work on path validation