refactor 3inrow check - more DRY