works ok for simple commands