changed parameter datastructure from dictionary to list