add more logic and payment calculate