some API changes, and added getParentDir method