tidying and removing logging