basic stats and first attempt to detect the nb of steps