first working code

This is the first commit with a working code.