debugged + added graph