added changeDir method