Added testing func for database and changed some string io