quick template put together
added template function to main plugin file