faster optimization: dont build empty list
use numpy random