1st working version

Test cases 1 and 2 are supported