add code to set maxwidth, logging for now