updated set_read_callback