tidied up a bit more