add output mode for averaged curves
add variance calculation