getData added to dbfunction