fixed paramter declaration in callback function cmd_func