removed console logging, re-added max data function