getkeypegs method