spiral matrix2 reimpl