added package checking