added array elements and greetings message correctly