more general script, not tested