refactoring LibGreenTea