Added straight up copy of the code
Added tests