added ripleykfunction