working prototype: measurement and pattern connection :D