implemented my-repeat and my-range functions