Improved matrix reading