Default case added
Moved default state