use ```isinstance``` here