Refactor & modified BrAC related algorithm ver 1.35e