extend for larger encoding matrix