first working version of program