Adds basic template to recv_data function