tidied up the beginning a little