added check_paid