changed the methods to accept a list instead of a dictionary