refactoring complete draw basic layout and add another feature - layout alert flag