removed the empty matrix stuff