missing curly brackets when selecting array element