finish controlling db access