Plugin rewritten