fix indentation
fix how errors are handldedl