add basic logic for plugin