Reasoning algorithm almost completed

- corrected bug in builder
- completed reasoning algorithm
- still missing classification table update
- still missing testing