using service instead of factory