add mock and tests