updated with a view data function