removed unnecessary if struct