work for csoaa and bug fix