updated Matrix operations