UI changes, implemented db function