renaming plugin and fixing function declaration