try to emulate working script