optimized for small matrixes (won't copy whole array ;)