lab1 better & faster generation