rand() considered as harmful