added optimalization and some graphs