add matrix features