if f'(x)=3x^2-2x+1 and the graph of f(x) contains the point (2,2). find f(x).

Please help I know I need to use integration

integrating f ' (x), we get

f(x) = x^3 - x^2 + x + c, where c is a constant
but the point (2,2) lies on f(x) , so

2 = 8 - 4 + 2 + c
c = -4

f(x) = ...