executeCommand function

Execute Command