added min max average function time