add command logic to the whole design