code refactoring, publish ready