Correct use of callback