restructured plugin to make it more clear