First code draft