added writing links to databas