add else condition initial if clause to restore original functionality