added bootstrap error estimation - needs work