added information gain function