Move this block into its own method.