ouch, my java collections skills are obviously lacking