updated bootstraping and its plot function, reorganised main.R