Update codes for addressing review comments