main post handler