new homework (matrix and switch)