rand is in stdlib.h