Adding the first cut of the code