added function to add sources to the database