modify console output for debugging, i think code is right, but promise seems to be wrong, continue update soon