added check if package is already defined