debugging, tidying