working for 0,1,2 up to the point of needing to print the result