rough pattern and extension implementation
prevent escaping