first try
remove one unnecessary if
remove extra end