tidied the whole thing up a bit
merging