added retrieve method to command class