refactor checkout object