set up utilities functions for commands