Refeactored to command.