completed matrix layout