cleaned up syscall emu