refactor initialize test