big improvements to output div