re-implemented .tell using database, does not yet work with aliases