FIX make nsample int