added seeding based on time to pseudorandom numbers