made random use srand with time