refactored matrix search into PlayFairMatrix class