median and variance algorithm added
step counter complete