explicitly included stdlib.h for srand