Added srand function