refactor item ordering