Thermal, spectral and morphological studies on nitrogen and phosphorus containing cellulose derivatives