converting to plugin