Updated to use method instead of copy/paste