moved RK4 to functions
implemented adaptive runge kutta. still some problems with hitting the atmosphere