add script to get median number