added randomGreetings function to randomly choose elements from array