frequency encoding, visualization, bugfix