standardizing input format for bar plots