fix indentation horror and add docs