initial working version.