functional start, TODO: histrograms are not filled