Changes in the functions to create the plots