The condition I have written isn't working