tidied branch up a bit