fixed #5, child should print the results of median