added getContents method