add commands file, and fix bug