added linking of bar and line graphs, added error messages