create function for generating random dataset