last attempt today

- moved plugin outside of function