switched to a much simplified matrix representation