Tidied up and simplified