added stdlib.h include to fix EXIT_SUCCESS/FAILURE undefined error