almost a workable complier, need more tunning, and begin refactor