re-factored for compatibility with the new ReFlow PR design