change variable name to dirPath