now returns an object instead of a dict