Do not query the array twice