cleaned code
adding graph