c191114-2

new code added; layout code separated