first version of working program