some notes to be tidied up