screenshot rule refactored