factory service for posts