Most of the stuff work. Remaining calculations ae broken