remove old matrix code