really added ripleykfunction