logging to database is working