matrix conversion, comments added