fixed decideFunc so no more flags are needed. started fixing utility function
issues: 1. slow 2. beatable (so, wrong) 3. utility function may still be wrong