plugin skeleton + helper functions