prepare to tidy up source