added toString() method to Command class