Tidied up version using the internal list.