implemented valid-rows?, valid-cols?, and valid-blocks? functions