added stdlib.h include for atoi() (why wasn't it complaining before?