modified node APIs, fixed json errors