by reference and removed unnecessary size variable in Matrix constructor