adding an object method for generating command