upsert post and refrences added