subtyping and logic added
typo