Change logic of cd to follow lab instructions.