output tweaks, add mask to random generator