tidied it up a little bit