finished plugin, need debugging