some demo code related to arrays
updated the code