script millorat, ara es responsiu