added new layout and events hendler