preliminary bar graph code