started using bookToDB function in production code