replaces java.util.Random with speedier implementation