ADD: original source code from Manson