Adapted case and added if