fix indentation
making more thread friendly