tidying up patch