refactored with glob-rules