Added more parameters to executeCommand