separate calculation of predict of node from calculation of info gain
fix bug