refactored plugins so argument parsing is simpler