Updated
Added tests and solution