db finally working