sign_or_zero function added