added better line graph function