split up basic plugin functionality into methods #2