basic cd function added