When is this function be called? And what is the difference from this function and the initial_data?