add checking for horizontal