correctly working version
add correct tests
correct tests