added else statement to cover all paths through switch