changed some variable names, added rad2deg fuction