Modified eg and ex scripts