added "unsafe" Matrix implementation, which fits better for our purpose
merge