Added implementation of Stas's db