added logger which logs to database
cleanup