modified rsk.py, still need to fix the equivalence class dictionary issue