Improving codes to create efficiently package