added support for cd and exit