added initial chart function