some functions to populate the database