Adding first version of the code