Adding fifth parameter boolean load_sample