first working version. but still uses constant parameters in source code.