making plugin as standard pattern