add logger for debugging
merge with master