initial commit, cloned from v1.13.0