Use references for data field in callbacks