subcription's db functions and tests added