generic bin handling