fix variable name, add debig code