Working solution
Test data
Added tests