created templating class, which will be used with spark