added resource module, added poll factory