attemt to solve median for running numbers problem