Adding the script median.lua