generic bin tree