refactored some GCN code