adding logging
merge latest changes