refactor getting scanDB infor