recoded how commands get activated