fix '0' bug and add testfunction(though dont konw how to use)