removed unnecessary if condition