add logic for checkout