initial version. apparently functional.