moved kernel call handler to separate functions, created dispatch table