added basic code and tests
the first working version