added rkey generation: unsure if it works