Updated code and tests .. should work