improving package detection