I'll have to think about your particular problem harder, but have you looked at books about design patterns? They might help you find the right algorithm for different things. Terri (running off to dinner or she'd say more)