fixed - now it works with lists, not only tuples