refactor - flat loader is subclass of regular loader