switched to brown, now using hmm
reimplemented main ui loop, fixed bug in pattern logic