Fix assessment function (attempt 2)