fixed and tested zero_func