implemented built in functions cd and exit