refactoring / API Help