First version of code

The crude code