fixed horizontal and vertical; added diagnol