first simple version of the code