added ability to use vertical layout