first version of worked programm