added some spacing to separate if/else from next

from next if else, 
also filled data_matrix using list comprehension to keep it short.