Adding code to write click data based on a callback. #1