implemented better version of non-zero