now accept undefined, better callbacks, more doc