add some codes related to database