Spectral and photochromic study of spiropyran