do not understand how array destructuring works here