I am going to change this so the docs.length === 0 check is before the docs.length > 1 check so that the checks are done in numerical order. Otherwise looks great.