abstracted dirty state check out into its own definition/method.