working syscall handler