document callbacks and functionality