implemented horizontal layout support