final bits of tidying