This is too many elseif in row. Make a table with item name as key and coresponding behavior as value