added check for defined Package