adjusted for node's callbacks