tidying up complex