added median step duration calculation