simplify newData by using a trick to make the old idea work