made cd and pwd into methods