added median, and base files