added temp function for generating array of objects