refactory command execute logic.