saving and retrieving events working with server