index out of bounds checking
refactor colour validation
make validators private
comment
vertical segment
horizontal segment