fixed graph normalization (still needs work)