removed an unnecessary if condition