Added functionality for getCommands