fixing the problem with random generation of Int values