Duplication?  Worth extracting as a function?