added random data script + bug fixes