fixed bug where adjacent 1s and 2s were considered "positive"
cleaned up output