add sponsorId and review some code