implemented _layout feature