some minor refactoring to prevent collision with internal names