avoid duplication in updateDB