callback functions controlled by options