I made a few adjustments to make the code compatable with my new code and just compile in some other cases