writing logic to check four of a kind, three of a kind and a pair