solved list comprehension, fill in matrix layer by layer