removed unnecessary if else views