first version with graph working