add divide median script