added block code pattern into cleaner method