forked and (very) mildly customized