remove unnecessary if check