extracts the common codes to a file and includes it.