fix pool init and add comments