changed using command object for input