added new cd function