implemented "stringify" method for database