reorganized brick detection. implemented tacho count.