add instanceOf method