we assume tabs for indentation, but that breaks the script when hooking a vanilla file that uses spaces. detecting which spacing is used might be the difficult part, though we could also pass it as a parameter