cleaned onSavedInstance method up