better middle ware on posts