change numteams&threadlimit to accept integer expression