Factory Method Pattern
Bug fix for judging zero