added some code snippets for NSArray class