use subtype instead of equal for subtype lookup
added instanceof label
add cast for #5