This is repeated code.