before using database