complete port of other scripts