tidied up a little bit