you should probably use boolean operators rather than nesting