further refactored into partial file