made matrix friendly