fix the bug by changing 'degree' to 'out_degree'