added alternative and not equal logic