refactoring - moving data to modes, modes estimation