updated database loging stuff