better structure, implemented entropy and ig