add sorted set functions