Removed restricttions on the length of one element of pair and added Word overflow handling