use float array for matrices