use map instead of list
bugfix for rc5