refactor card bin