corrected the random splitting filling function