modify get data function