added constructor for organized graph