baofit fitting option added
out-of-bounds check for all access functions introduced