try to define the data function