Added proper cd functionality