switched to static matrices