begin node functions and fix a little problem