added ignore logic to first if instead of adding a nested condition