tidied it up a bit more