rand is declared in cstdlib