Using encoded patterns