Initial version of the code