more refactor, scan package feature