Rearrange lines so tests pass