Copied a few helpers from tddu project