minor tidying required