Matrix alternative version