reorganize for testing