add matirx generation absent/present handling