finished alpha version of degree calculation and loading into a file