updated structure for script, not tested