plotting graphs and updated explaination