Edited checkdiagonal so it accepts caps and small letters