Sometimes you can't use and, try using && for the second and in the condition