documentation and a handy method for training the database