move some code around, not syscalls