refactor deck builder