Adding graph scoring calculation