use instance of instead of gettype