reorganizing
optimized loader code