added if cases for instanceof