finished basic setup for Matrix