diff --git a/README.md b/README.md
index 10a6289976e27d74d21fe1bcdad60d61dd72d247..fec890dc340bf97e8558a7701c86aba53856df75 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ A cross plattform project for android and ios to log events offline everywhere a
 - Events added on the addevent.dart page have to be stored locally persistently. They can be displayed in the view
   events widget. Each event has a flag which shows if the event is already exported to sensor.
   Shall exported events be displayed here? Slide switch to also show exported events?
-- Functionality to export events locally for backup in the field!
+- Functionality to export events locally for backup in the field! 
 
  
 ## Configuration Page
@@ -53,6 +53,6 @@ The fields lat, long, elevation are updated automatically if checkbox is checked
 a-z , A-Z , _ , 0-9 , ,(Comma) , ( , ) , + , - , . , : 
  
 -90 => Latitude <= +90
--180 => Latitude <= +180
+-180 => Longitude <= +180
  Elevation: any numer
  
diff --git a/lib/addevent.dart b/lib/addevent.dart
index 8a1549428eec06e85ecfbe04814a47136dc8cd7c..a79a847a8e7478b580cbda202387690583b06978 100644
--- a/lib/addevent.dart
+++ b/lib/addevent.dart
@@ -465,10 +465,13 @@ class _AddEventPageState extends State<AddEvent>  {
                     if (_validateInput()) {
                       _storeCurrentEvent();
                       HapticFeedback.vibrate();
+
+                      //Update time for next event
+                      var date = DateTime.now().toUtc();
+                      eventsStore.currentEvent.startDate = '$date';
+                      eventsStore.currentEvent.endDate = '$date';
                     }
-                    else {
-                      setState(() {});
-                    }
+                    setState(() {});
                   },
                   tooltip: 'Add Event',
                   child: const Icon(Icons.check),
diff --git a/lib/configuration.dart b/lib/configuration.dart
index c02ef0866458befb5f52d506a871e44145ce85ca..56e37661de316e3189ddb9b38265feb2fb68a34f 100644
--- a/lib/configuration.dart
+++ b/lib/configuration.dart
@@ -253,7 +253,7 @@ class _MyHomePageState extends State<Configuration> {
             icon: const Icon(Icons.cancel),
             label: const Text('Reset all'),
             onPressed: () {
-              events.reset();
+              //events.reset();  //TODO: remove before release!
               configuration.reset();
             },
           ),
diff --git a/lib/datamodel.dart b/lib/datamodel.dart
index a4f671d94f6d0ccf2c9a800ea18d6102ac969e80..2ab5425c05d664df4b4b23e9dc95c84073f51824 100644
--- a/lib/datamodel.dart
+++ b/lib/datamodel.dart
@@ -87,6 +87,23 @@ class Event{
     );
   }
 
+  Map<String, dynamic> toSensorJson() => {
+    'itemID':id,
+    'inheritToAllChildren':'false',
+    'inheritToChildren':[],
+    'event':{
+      'startDate':startDate,
+      'endDate':endDate,
+      'label':label,
+      'description':description,
+      'eventType':type,
+      'latitude':latitude,
+      'longitude':longitude,
+      'elevationInMeter':elevation,
+      'id':0
+    }
+  };
+
   @override
   String toString(){
     return '{ ${this.id}, '
@@ -94,6 +111,8 @@ class Event{
         '${this.label}, '
         '${this.type}, '
         '${this.description}, '
+        '${this.startDate}, '
+        '${this.endDate}, '
         '${this.latitude},'
         '${this.longitude},'
         '${this.elevation},'
diff --git a/lib/main.dart b/lib/main.dart
index 08d841bb4346d6adf738e46810de6a06f5765d54..9ba93c6a996efad7860101fd4b7b2625eb97505f 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -39,6 +39,7 @@ void main() {
 
   
   //Add some dummy events to event store. Just development purpose. TODO: Remove after development.
+  /*
   events.events.add(Event.fromJson({
     'id': 8311,
     'urn': 'station:neumayer_iii:awi_snow_sampler_1',
@@ -79,6 +80,8 @@ void main() {
     'startDate': '2022-03-08T05:29:26Z',
     'endDate': '2022-03-08T06:29:26Z'
   }));
+  */
+
   
   //Add some dummy eventtypes.
   // TODO: loard from shared preferences.
diff --git a/lib/viewevents.dart b/lib/viewevents.dart
index 4db21a705dbd2df48454fb08a08d518578be96a6..39f3d0160f5e1ba13eb34a2d9387314223c9a0d3 100644
--- a/lib/viewevents.dart
+++ b/lib/viewevents.dart
@@ -1,6 +1,69 @@
+import 'dart:convert';
+
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'datamodel.dart';
+import 'package:http/http.dart' as http;
+
+Future<bool> syncEvents() async {
+  final EventStoreInstance events = EventStoreInstance();
+
+  String base_url = 'https://sandbox.sensor.awi.de/rest/sensors/events/putEvent/';
+  String url = '';
+
+  debugPrint('Number of Events: ' + events.events.length.toString());
+  debugPrint('Pending Events:');
+  var index = 0;
+  for (var event in events.events){
+    if (event.status == 'PENDING') {
+      debugPrint('Idx: ' + index.toString() + ' ' + event.toSensorJson().toString());
+      index++;
+
+      url = base_url + event.id.toString() + '?createVersion=false';
+      debugPrint('XXX ' + Uri.parse(url).toString());
+      final response = await http.put(Uri.parse(url),
+        headers: { "Accept" : "application/json"},
+        body: event.toSensorJson().toString(),
+        encoding: Encoding.getByName("utf-8"),
+      );
+
+      if (response.statusCode == 200) {
+        debugPrint('put success');
+
+        debugPrint(response.body.toString());
+        debugPrint(response.headers.toString());
+        debugPrint(response.headers['set-cookie']);
+
+
+      } else {
+        debugPrint('Header: ' + response.headers.toString());
+        debugPrint('Body: ' + response.body.toString());
+        debugPrint('StatusCode: ' + response.statusCode.toString());
+        throw Exception('Failed to login');
+      }
+
+
+
+
+
+    }
+  }
+
+  return true;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 class ViewEvents extends StatelessWidget {
   const ViewEvents({Key? key}) : super(key: key);
@@ -164,7 +227,12 @@ class ViewEvents extends StatelessWidget {
             icon: null,
             label: const Text('Sync'),
             onPressed: () {
+              //showDialog(
+              //  context: context,
+              //  builder: (BuildContext context) => _buildPopupDialog(context),
+              //);
 
+              syncEvents();
             },
           ),
         ],
@@ -173,4 +241,25 @@ class ViewEvents extends StatelessWidget {
   }
 }
 
+Widget _buildPopupDialog(BuildContext context) {
+  return AlertDialog(
+    title: const Text('Popup example'),
+    content: Column(
+      mainAxisSize: MainAxisSize.min,
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: const <Widget>[
+        Text("Hello"),
+      ],
+    ),
+    actions: <Widget>[
+      FlatButton(
+        onPressed: () {
+          Navigator.of(context).pop();
+        },
+        textColor: Theme.of(context).primaryColor,
+        child: const Text('Close'),
+      ),
+    ],
+  );
+}
 //TODO: allow editing fields here. Check validation of input value!
\ No newline at end of file