Removing logging
fixed indentation
fixed typeerror