second version of fundamental theorem