threding back, and db logging added