pre accepts array of commands.

It should be backward compatible.