add getType() method