1. add gc;
2. minor refactoring;