clean up to match pattern