Example codes used to resolve different cases