Re-copied current code.