Fix some bugs. Add restriction on the number of elements (int). Need: keySet, entrySet