Answer to SO 18191213 question