Why the switch to a type of Object? That can behave very oddly, plus it makes you have to cast it to do anything with it.