added vote factory for angular