add cat script
fix bugs
fix more