fixing indentation; logging