working preprocessing, and visualization discrete bar