Updated conditions to use an array