restructured plugin to meet plugin requirements