changed controller snippet to use array syntax