trying to get rid of is_instance check