I found this hard to read as the indentation is off, can we refactor this to make it clearer?