draft version of the code