first version of code

first version of code