adjustments to code and layout