start of red script definition