Added a method to turn a hashmap into parameters