array pointer code added