refactor code to branch auction type