fix samples counting
fix sampling period