splitting things out a bit and fixing identations