Removed unnecessary if-statements