extra features added

*destroy array feature added
*error handler added