REFACTOR: Fixed the amount rule and duplicated category problem