working code. First commit