use asInstanceOf instead of toString