implemented bootstrap, still to improve diagnostic plot