refactor & 3. & 4.