compatibility for nodejs callback convention