refactor private init method