refactoring for testing.
limiting export funcs.