minor refactor in checkout controller