rewrote w/ SYSTEM_CALL macros