moved postingService factory to a separate file