This is the first version of the code.