extracting common bits of source code loading