implemented database inserter