diff --git a/src/include/hlib.h b/src/include/hlib.h
index 05fc7e0..699c8d0 100644
--- a/src/include/hlib.h
+++ b/src/include/hlib.h
@@ -68,6 +68,7 @@
 extern void *listPopFirst(ListElement **list);
 extern uint32_t listCount(ListElement *list);
 extern void *listGet(ListElement *list, uint32_t position);
+extern bool listRemoveValue(ListElement **list, void *value);
 extern void *getPhysicalAddress(void *address);
 
 #endif

diff --git a/src/include/hlib.h b/src/include/hlib.h
index 05fc7e0..699c8d0 100644
--- a/src/include/hlib.h
+++ b/src/include/hlib.h
@@ -68,6 +68,7 @@
 extern void *listPopFirst(ListElement **list);
 extern uint32_t listCount(ListElement *list);
 extern void *listGet(ListElement *list, uint32_t position);
+extern bool listRemoveValue(ListElement **list, void *value);
 extern void *getPhysicalAddress(void *address);
 
 #endif
diff --git a/src/kernel/include/service.h b/src/kernel/include/service.h
index bf22f17..fb48cc4 100644
--- a/src/kernel/include/service.h
+++ b/src/kernel/include/service.h
@@ -26,7 +26,7 @@
 } ServiceFunction;
 
 typedef struct {
-    char *name;
+    uint32_t name; // this is a string ID
     ListElement *subscriptions;
     ListElement *waitingSyscalls;
 } Event;

diff --git a/src/include/hlib.h b/src/include/hlib.h
index 05fc7e0..699c8d0 100644
--- a/src/include/hlib.h
+++ b/src/include/hlib.h
@@ -68,6 +68,7 @@
 extern void *listPopFirst(ListElement **list);
 extern uint32_t listCount(ListElement *list);
 extern void *listGet(ListElement *list, uint32_t position);
+extern bool listRemoveValue(ListElement **list, void *value);
 extern void *getPhysicalAddress(void *address);
 
 #endif
diff --git a/src/kernel/include/service.h b/src/kernel/include/service.h
index bf22f17..fb48cc4 100644
--- a/src/kernel/include/service.h
+++ b/src/kernel/include/service.h
@@ -26,7 +26,7 @@
 } ServiceFunction;
 
 typedef struct {
-    char *name;
+    uint32_t name; // this is a string ID
     ListElement *subscriptions;
     ListElement *waitingSyscalls;
 } Event;
diff --git a/src/kernel/service/eventSyscalls.c b/src/kernel/service/eventSyscalls.c
index 28a4c51..ae5db94 100644
--- a/src/kernel/service/eventSyscalls.c
+++ b/src/kernel/service/eventSyscalls.c
@@ -3,7 +3,7 @@
 #include <util.h>
 
 void handleCreateEventSyscall(Syscall *call) {
-    char *name = retrieveString(call->parameters[0]);
+    uint32_t name = call->parameters[0];
     if (!name) {
         return;
     }
@@ -18,7 +18,7 @@
 extern ListElement *kernelEvents;
 
 void handleGetEventSyscall(Syscall *call) {
-    char *name = retrieveString(call->parameters[1]);
+    uint32_t name = call->parameters[1];
     if (!name) {
         return;
     }
@@ -28,7 +28,7 @@
         events = ((Service *)listGet(services, call->parameters[0]))->events;
     }
     foreach (events, Event *, event, {
-        if (stringEquals(event->name, name)) {
+        if (event->name == name) {
             call->returnValue = i;
             return;
         }

diff --git a/src/include/hlib.h b/src/include/hlib.h
index 05fc7e0..699c8d0 100644
--- a/src/include/hlib.h
+++ b/src/include/hlib.h
@@ -68,6 +68,7 @@
 extern void *listPopFirst(ListElement **list);
 extern uint32_t listCount(ListElement *list);
 extern void *listGet(ListElement *list, uint32_t position);
+extern bool listRemoveValue(ListElement **list, void *value);
 extern void *getPhysicalAddress(void *address);
 
 #endif
diff --git a/src/kernel/include/service.h b/src/kernel/include/service.h
index bf22f17..fb48cc4 100644
--- a/src/kernel/include/service.h
+++ b/src/kernel/include/service.h
@@ -26,7 +26,7 @@
 } ServiceFunction;
 
 typedef struct {
-    char *name;
+    uint32_t name; // this is a string ID
     ListElement *subscriptions;
     ListElement *waitingSyscalls;
 } Event;
diff --git a/src/kernel/service/eventSyscalls.c b/src/kernel/service/eventSyscalls.c
index 28a4c51..ae5db94 100644
--- a/src/kernel/service/eventSyscalls.c
+++ b/src/kernel/service/eventSyscalls.c
@@ -3,7 +3,7 @@
 #include <util.h>
 
 void handleCreateEventSyscall(Syscall *call) {
-    char *name = retrieveString(call->parameters[0]);
+    uint32_t name = call->parameters[0];
     if (!name) {
         return;
     }
@@ -18,7 +18,7 @@
 extern ListElement *kernelEvents;
 
 void handleGetEventSyscall(Syscall *call) {
-    char *name = retrieveString(call->parameters[1]);
+    uint32_t name = call->parameters[1];
     if (!name) {
         return;
     }
@@ -28,7 +28,7 @@
         events = ((Service *)listGet(services, call->parameters[0]))->events;
     }
     foreach (events, Event *, event, {
-        if (stringEquals(event->name, name)) {
+        if (event->name == name) {
             call->returnValue = i;
             return;
         }
diff --git a/src/kernel/service/events.c b/src/kernel/service/events.c
index 618f152..3da186c 100644
--- a/src/kernel/service/events.c
+++ b/src/kernel/service/events.c
@@ -1,4 +1,5 @@
 #include <service.h>
+#include <stringmap.h>
 #include <util.h>
 
 ListElement *kernelEvents;
@@ -8,7 +9,7 @@
 Event *createKernelEvent(char *name) {
     Event *event = malloc(sizeof(ServiceFunction));
     event->subscriptions = NULL;
-    event->name = name;
+    event->name = insertString(name);
     listAdd(&kernelEvents, event);
     return event;
 }

diff --git a/src/include/hlib.h b/src/include/hlib.h
index 05fc7e0..699c8d0 100644
--- a/src/include/hlib.h
+++ b/src/include/hlib.h
@@ -68,6 +68,7 @@
 extern void *listPopFirst(ListElement **list);
 extern uint32_t listCount(ListElement *list);
 extern void *listGet(ListElement *list, uint32_t position);
+extern bool listRemoveValue(ListElement **list, void *value);
 extern void *getPhysicalAddress(void *address);
 
 #endif
diff --git a/src/kernel/include/service.h b/src/kernel/include/service.h
index bf22f17..fb48cc4 100644
--- a/src/kernel/include/service.h
+++ b/src/kernel/include/service.h
@@ -26,7 +26,7 @@
 } ServiceFunction;
 
 typedef struct {
-    char *name;
+    uint32_t name; // this is a string ID
     ListElement *subscriptions;
     ListElement *waitingSyscalls;
 } Event;
diff --git a/src/kernel/service/eventSyscalls.c b/src/kernel/service/eventSyscalls.c
index 28a4c51..ae5db94 100644
--- a/src/kernel/service/eventSyscalls.c
+++ b/src/kernel/service/eventSyscalls.c
@@ -3,7 +3,7 @@
 #include <util.h>
 
 void handleCreateEventSyscall(Syscall *call) {
-    char *name = retrieveString(call->parameters[0]);
+    uint32_t name = call->parameters[0];
     if (!name) {
         return;
     }
@@ -18,7 +18,7 @@
 extern ListElement *kernelEvents;
 
 void handleGetEventSyscall(Syscall *call) {
-    char *name = retrieveString(call->parameters[1]);
+    uint32_t name = call->parameters[1];
     if (!name) {
         return;
     }
@@ -28,7 +28,7 @@
         events = ((Service *)listGet(services, call->parameters[0]))->events;
     }
     foreach (events, Event *, event, {
-        if (stringEquals(event->name, name)) {
+        if (event->name == name) {
             call->returnValue = i;
             return;
         }
diff --git a/src/kernel/service/events.c b/src/kernel/service/events.c
index 618f152..3da186c 100644
--- a/src/kernel/service/events.c
+++ b/src/kernel/service/events.c
@@ -1,4 +1,5 @@
 #include <service.h>
+#include <stringmap.h>
 #include <util.h>
 
 ListElement *kernelEvents;
@@ -8,7 +9,7 @@
 Event *createKernelEvent(char *name) {
     Event *event = malloc(sizeof(ServiceFunction));
     event->subscriptions = NULL;
-    event->name = name;
+    event->name = insertString(name);
     listAdd(&kernelEvents, event);
     return event;
 }
diff --git a/src/userland/hlib/list.c b/src/userland/hlib/list.c
index f01784f..897e0a5 100644
--- a/src/userland/hlib/list.c
+++ b/src/userland/hlib/list.c
@@ -39,3 +39,24 @@
     }
     return list->data;
 }
+
+bool listRemoveValue(ListElement **list, void *value) {
+    if (!*list) {
+        return false;
+    }
+    ListElement *element = *list, *previous = NULL;
+    while (element) {
+        if (element->data == value) {
+            if (previous) {
+                previous->next = element->next;
+            } else {
+                *list = element->next;
+            }
+            free(element);
+            return true;
+        }
+        previous = element;
+        element = element->next;
+    }
+    return false;
+}

diff --git a/src/include/hlib.h b/src/include/hlib.h
index 05fc7e0..699c8d0 100644
--- a/src/include/hlib.h
+++ b/src/include/hlib.h
@@ -68,6 +68,7 @@
 extern void *listPopFirst(ListElement **list);
 extern uint32_t listCount(ListElement *list);
 extern void *listGet(ListElement *list, uint32_t position);
+extern bool listRemoveValue(ListElement **list, void *value);
 extern void *getPhysicalAddress(void *address);
 
 #endif
diff --git a/src/kernel/include/service.h b/src/kernel/include/service.h
index bf22f17..fb48cc4 100644
--- a/src/kernel/include/service.h
+++ b/src/kernel/include/service.h
@@ -26,7 +26,7 @@
 } ServiceFunction;
 
 typedef struct {
-    char *name;
+    uint32_t name; // this is a string ID
     ListElement *subscriptions;
     ListElement *waitingSyscalls;
 } Event;
diff --git a/src/kernel/service/eventSyscalls.c b/src/kernel/service/eventSyscalls.c
index 28a4c51..ae5db94 100644
--- a/src/kernel/service/eventSyscalls.c
+++ b/src/kernel/service/eventSyscalls.c
@@ -3,7 +3,7 @@
 #include <util.h>
 
 void handleCreateEventSyscall(Syscall *call) {
-    char *name = retrieveString(call->parameters[0]);
+    uint32_t name = call->parameters[0];
     if (!name) {
         return;
     }
@@ -18,7 +18,7 @@
 extern ListElement *kernelEvents;
 
 void handleGetEventSyscall(Syscall *call) {
-    char *name = retrieveString(call->parameters[1]);
+    uint32_t name = call->parameters[1];
     if (!name) {
         return;
     }
@@ -28,7 +28,7 @@
         events = ((Service *)listGet(services, call->parameters[0]))->events;
     }
     foreach (events, Event *, event, {
-        if (stringEquals(event->name, name)) {
+        if (event->name == name) {
             call->returnValue = i;
             return;
         }
diff --git a/src/kernel/service/events.c b/src/kernel/service/events.c
index 618f152..3da186c 100644
--- a/src/kernel/service/events.c
+++ b/src/kernel/service/events.c
@@ -1,4 +1,5 @@
 #include <service.h>
+#include <stringmap.h>
 #include <util.h>
 
 ListElement *kernelEvents;
@@ -8,7 +9,7 @@
 Event *createKernelEvent(char *name) {
     Event *event = malloc(sizeof(ServiceFunction));
     event->subscriptions = NULL;
-    event->name = name;
+    event->name = insertString(name);
     listAdd(&kernelEvents, event);
     return event;
 }
diff --git a/src/userland/hlib/list.c b/src/userland/hlib/list.c
index f01784f..897e0a5 100644
--- a/src/userland/hlib/list.c
+++ b/src/userland/hlib/list.c
@@ -39,3 +39,24 @@
     }
     return list->data;
 }
+
+bool listRemoveValue(ListElement **list, void *value) {
+    if (!*list) {
+        return false;
+    }
+    ListElement *element = *list, *previous = NULL;
+    while (element) {
+        if (element->data == value) {
+            if (previous) {
+                previous->next = element->next;
+            } else {
+                *list = element->next;
+            }
+            free(element);
+            return true;
+        }
+        previous = element;
+        element = element->next;
+    }
+    return false;
+}
diff --git a/src/userland/pit/main.c b/src/userland/pit/main.c
index 139b971..4b37a0c 100644
--- a/src/userland/pit/main.c
+++ b/src/userland/pit/main.c
@@ -22,15 +22,41 @@
 #define CMD_COUNTER0 0x00
 #define CMD_COUNTER2 0x80
 
+#include "../hlib/include/syscalls.h"
+
 uint32_t systemTime = 0;
-
-void interruptHandler() { systemTime++; }
-
+ListElement *sleepNotifications = NULL;
+uint32_t serviceId;
 bool initialized = false;
 
+void interruptHandler() {
+    systemTime++;
+    if (systemTime % 1000 == 0) {
+        printf("test\n");
+    }
+    if (listRemoveValue(&sleepNotifications, PTR(systemTime))) {
+        printf("sleep end %i with call %i\n", systemTime,
+               syscall(SYS_GET_EVENT, serviceId, systemTime, 0, 0));
+        fireEvent(syscall(SYS_GET_EVENT, serviceId, systemTime, 0, 0), 0);
+    }
+}
+
+void sleep(uint32_t millis) {
+    uint32_t targetTime = systemTime + millis / 10;
+    listAdd(&sleepNotifications, PTR(targetTime));
+    uint32_t event = syscall(SYS_GET_EVENT, serviceId, targetTime, 0, 0);
+    if (!event) {
+        event = syscall(SYS_CREATE_EVENT, targetTime, 0, 0, 0);
+    }
+    await(serviceId, event);
+    // TODO: remove unused event
+}
+
 int32_t main() {
     if (!initialized) {
         initialized = true;
+        serviceId = getServiceId();
+        createFunction("sleep", (void *)sleep);
         uint32_t service = getService("pic");
         uint32_t event = getEvent(service, "irq0");
         subscribeEvent(service, event, interruptHandler);
@@ -43,5 +69,7 @@
         printf("timer handler installed\n");
     } else {
         printf("current uptime: %i.%is\n", systemTime / 100, systemTime % 100);
+        printf("waiting one second...\n");
+        sleep(1000);
     }
 }