adding matrix with staff solution