add error checking for path ids