initially written version; no tests yet