rewritten function with returning set of first 10 elements