nearly finished checkout implementation