added package detection