switch statement to add to dom