improvements to path, validate and array functions