change send_command interface
fix bug, add tweaks