properly handle vertical format