tidied up for submission