initial version of the code