add parallel for line 287
comment out parallel for except sampling