added reshape2 and ggplot libraries where needed