support subtyping and dot operator