Cosinus matrix is initialized only once