It works! I just copied the above method to my class and made sure I called it when I initialized. You do have to import some of the classes...
Separate names with a comma.