add singleton to pattern analysis
move singleton