new script

todo: change setcode