put random.seed() in a more sensible place