models: adding histogram method class and functions