updated formatting, also added log statement.