improve package handling