update priv to pub post and code